using UnityEngine;

public class SunController : MonoBehaviour
{
	public LensFlare curflare;

	private void Update()
	{
		Vector3 position = Camera.main.transform.position;
		if (position.y > 400f)
		{
			curflare.brightness = Mathf.Lerp(curflare.brightness, 0.7f, Time.deltaTime * 2f);
		}
		else
		{
			curflare.brightness = Mathf.Lerp(curflare.brightness, 0f, Time.deltaTime * 2f);
		}
	}
}
